<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="util.*" %>
<%@ page import="model.*" %>
<%@ page import="control.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>pic_add_update_chuli.jsp</title>
			<link href="../../../resources/css/admin/pages_subpage.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../../resources/js/jquery-1.3.2.js"></script>
  <script>
  	$(function(){
				//添加隔行换色
				$("tbody tr:odd").addClass("oddTR");
				
				// 添加鼠标经过样式
				$("tbody tr").mouseover(function(){
					$(this).addClass("mouseOverTR");
					$(this).children("td").each(function(){
						$(this).addClass("mouseOverTD");
						});
				});
					
				
				$("tbody tr").mouseout(function(){
					$(this).removeClass(["mouseOverTR"]);
					$(this).children("td").each(function(){
							$(this).removeClass(["mouseOverTD"]);
						});
					});
			})
			
  </script>
	</head>
	<body>
			<form action="pic_add_update_chuli.jsp" name="form1" method="post">
  			<table width="100%" border="0" cellpadding="0" cellspacing="0">
  			<thead>
  			<tr>
				<th width="100">图片</th>
				<th width="100">图片描述</th>
			</tr>
			</thead>
			<tbody>
		<% //此页面为刚上传的图片 添加 描述信息
			request.setCharacterEncoding("UTF-8");
			//ArrayList<Integer> pic_idlist=new ArrayList<Integer>();
			//本来想有数组传id来修改信息的，不太会用，因id是整型，不过现在这个是好使的。但又不用id传了。
		    ArrayList photolist=(ArrayList)session.getAttribute("photolist");
		    if(photolist.size()==0){
                	  out.println("<tr><td>未上传图片！</td></tr>");  
            }else{
            for(int i=0;i<(photolist.size());i++){
                	  String pic_path=(String)(photolist.get(i));
                	  //pic_idlist.add(pic.getId());
                %>
            	<tr>
					 <td>
					 	 <img src="../../../resources/photos/<%=pic_path%>" alt="" width="120" height="150" />
					 </td>
					 <td>
						 <textarea cols="40"  rows="5" name="<%=pic_path%>"  id="<%=pic_path%>" ></textarea>
					 </td>
			    </tr>    
				 <%}
             }
         %>
         	<tr>
    				<td >&nbsp;</td>
    				<td class="left">
    					<input type="submit" name="Submit" value="提交"  />&nbsp;&nbsp;&nbsp;&nbsp;
     					 <input type="reset" name="Reset" value="重置" />
    				</td>
 			    </tr>
         	</tbody>
			</table>
		 </form>
	</body>
</html>
